﻿@model IEnumerable<EventSys.BussinesEntities.Director>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>BUSCAR DIRECTORES</h2>

<p>
    @Html.ActionLink("Nuevo", "Create")
</p>

@using (Html.BeginForm())
{
    <fieldset>
        <legend></legend><b>Nombre o DNI:</b> 
        <input type="search" name="criterio" value="" placeholder="Ingrese R. Social o Dni"/>
        <input type="submit" name="buscar" value="Buscar" class="k-button"/>
    </fieldset>
}

<div class="CSSTableGenerator">


<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.idDirector)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DNI)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Nombre)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Apellidos)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Dirección)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Telefono)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Celular)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Email)
        </th>
        <th>
            Carrera
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.idDirector)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DNI)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Nombre)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Apellidos)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Dirección)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Telefono)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Celular)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Email)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Carrera.Carrera1)
        </td>
        <td>
            @Html.ActionLink("Editar", "Edit", new { id=item.idDirector  }) |
            @*@Html.ActionLink("Details", "Details", new { id=item.idDirector   }) |*@
           @* @Html.ActionLink("Eliminar", "Delete", new { /*id=item.PrimaryKey */ })*@
        </td>
    </tr>
}

</table>

    <div>
    @Html.ActionLink("Regresar", "Index")
</div>

</div>

